<!DOCTYPE html>
<html>
  <head>
    <meta name="creator" content="mantohtml v2.0.1">
    <title>ippfind(1)</title>
  </head>
  <body>
    <h1 id="ippfind-1">ippfind(1)</h1>
    <h2 id="ippfind-1.name">Name</h2>
<p>ippfind - find internet printing protocol printers
</p>
    <h2 id="ippfind-1.synopsis">Synopsis</h2>
<p><strong>ippfind</strong>
[
<em>options</em>
] <em>regtype</em>[<strong>,</strong><em>subtype</em>][<strong>.</strong><em>domain</em><strong>.</strong>] ... [
<em>expression</em>
 ... ]
<br>
<strong>ippfind</strong>
[
<em>options</em>
] <em>name</em>[<strong>.</strong><em>regtype</em>[<strong>.</strong><em>domain</em><strong>.</strong>]] ... [
<em>expression</em>
 ... ]
<br>
<strong>ippfind</strong>
<strong>--help</strong>
<br>
<strong>ippfind</strong>
<strong>--version</strong>
</p>
    <h2 id="ippfind-1.description">Description</h2>
<p><strong>ippfind</strong> finds services registered with a DNS server or available through local devices.
Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands.
</p>
    <h3 id="ippfind-1.description.registration-types">Registration Types</h3>
<p><strong>ippfind</strong> supports the following registration types:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">_http._tcp<br>
HyperText Transport Protocol (HTTP, RFC 2616)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">_https._tcp<br>
Secure HyperText Transport Protocol (HTTPS, RFC 2818)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">_ipp._tcp<br>
Internet Printing Protocol (IPP, RFC 2911)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">_ipps._tcp<br>
Secure Internet Printing Protocol (IPPS, draft)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">_printer._tcp<br>
Line Printer Daemon (LPD, RFC 1179)
</p>
    <h3 id="ippfind-1.description.expressions">Expressions</h3>
<p><strong>ippfind</strong> supports expressions much like the
<strong>find</strong>(1)

utility.
However, unlike
<strong>find</strong>(1),

<strong>ippfind</strong> uses POSIX regular expressions instead of shell filename matching patterns.
If <em>--exec</em>, <em>-l</em>, <em>--ls</em>, <em>-p</em>, <em>--print</em>, <em>--print-name</em>, <em>-q</em>, <em>--quiet</em>, <em>-s</em>, or <em>-x</em> is not specified, <strong>ippfind</strong> adds <em>--print</em> to print the service URI of anything it finds.
The following expressions are supported:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-d </strong><em>regex</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--domain </strong><em>regex</em><br>
True if the domain matches the given regular expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--false</strong><br>
Always false.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-h </strong><em>regex</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--host </strong><em>regex</em><br>
True is the hostname matches the given regular expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-l</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--ls</strong><br>
Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional <em>find</em> &quot;-ls&quot; output for HTTP URLs.
The result is true if the URI is accessible, false otherwise.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--local</strong><br>
True if the service is local to this computer.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-N </strong><em>name</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--literal-name </strong><em>name</em><br>
True if the service instance name matches the given name.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-n </strong><em>regex</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--name </strong><em>regex</em><br>
True if the service instance name matches the given regular expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--path </strong><em>regex</em><br>
True if the URI resource path matches the given regular expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-P </strong><em>number</em>[<strong>-</strong><em>number</em>]<br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--port </strong><em>number</em>[<strong>-</strong><em>number</em>]<br>
True if the port matches the given number or range.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-p</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--print</strong><br>
Prints the URI if the result of previous expressions is true.
The result is always true.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-q</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--quiet</strong><br>
Quiet mode - just returns the exit codes below.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-r</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--remote</strong><br>
True if the service is not local to this computer.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-s</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--print-name</strong><br>
Prints the service instance name if the result of previous expressions is true.
The result is always true.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--true</strong><br>
Always true.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-t </strong><em>key</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--txt </strong><em>key</em><br>
True if the TXT record contains the named key.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--txt-</strong><em>key regex</em><br>
True if the TXT record contains the named key and matches the given regular expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-u </strong><em>regex</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--uri </strong><em>regex</em><br>
True if the URI matches the given regular expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-x </strong><em>utility </em>[ <em>argument </em>... ] <strong>;</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--exec </strong><em>utility </em>[ <em>argument </em>... ] <strong>;</strong><br>
Executes the specified program if the current result is true.
&quot;{foo}&quot; arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
</p>
    <p>Expressions may also contain modifiers:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>( </strong><em>expression </em><strong>)</strong><br>
Group the result of expressions.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>! </strong><em>expression</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--not </strong><em>expression</em><br>
Unary NOT of the expression.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><em>expression expression</em><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><em>expression </em><strong>--and </strong><em>expression</em><br>
Logical AND of expressions.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><em>expression </em><strong>--or </strong><em>expression</em><br>
Logical OR of expressions.
</p>
    <h3 id="ippfind-1.description.substitutions">Substitutions</h3>
<p>The substitutions for &quot;{foo}&quot; in <em>-e</em> and <em>--exec</em> are:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_domain}</strong><br>
Domain name, e.g., &quot;example.com.&quot;, &quot;local.&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_hostname}</strong><br>
Fully-qualified domain name, e.g., &quot;printer.example.com.&quot;, &quot;printer.local.&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_name}</strong><br>
Service instance name, e.g., &quot;My Fine Printer&quot;.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_port}</strong><br>
Port number for server, typically 631 for IPP and 80 for HTTP.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_regtype}</strong><br>
DNS-SD registration type, e.g., &quot;_ipp._tcp&quot;, &quot;_http._tcp&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_scheme}</strong><br>
URI scheme for DNS-SD registration type, e.g., &quot;ipp&quot;, &quot;http&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{}</strong><br>
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{service_uri}</strong><br>
URI for service, e.g., &quot;ipp://printer.local./ipp/print&quot;, &quot;<a href="http://printer.local./&quot;">http://printer.local./&quot;</a>, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{txt_</strong><em>key</em><strong>}</strong><br>
Value of TXT record <em>key</em> (lowercase).
</p>
    <h2 id="ippfind-1.options">Options</h2>
<p><strong>ippfind</strong> supports the following options:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--help</strong><br>
Show program help.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--version</strong><br>
Show program version.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-4</strong><br>
Use IPv4 when listing.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-6</strong><br>
Use IPv6 when listing.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-T </strong><em>seconds</em><br>
Specify find timeout in seconds.
If 1 or less, <strong>ippfind</strong> stops as soon as it thinks it has found everything.
The default timeout is 1 second.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>-V </strong><em>version</em><br>
Specifies the IPP version when listing.
Supported values are &quot;1.1&quot;, &quot;2.0&quot;, &quot;2.1&quot;, and &quot;2.2&quot;.
</p>
    <h2 id="ippfind-1.exit-status">Exit Status</h2>
<p><strong>ippfind</strong> returns 0 if the result for all processed expressions is true, 1 if the result of any processed expression is false, 2 if browsing or any query or resolution failed, 3 if an undefined option or invalid expression was specified, and 4 if it ran out of memory.
</p>
    <h2 id="ippfind-1.environment">Environment</h2>
<p>When executing a program, <strong>ippfind</strong> sets the following environment variables for the matching service registration:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_DOMAIN</strong><br>
Domain name, e.g., &quot;example.com.&quot;, &quot;local.&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_HOSTNAME</strong><br>
Fully-qualified domain name, e.g., &quot;printer.example.com.&quot;, &quot;printer.local.&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_NAME</strong><br>
Service instance name, e.g., &quot;My Fine Printer&quot;.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_PORT</strong><br>
Port number for server, typically 631 for IPP and 80 for HTTP.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_REGTYPE</strong><br>
DNS-SD registration type, e.g., &quot;_ipp._tcp&quot;, &quot;_http._tcp&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_SCHEME</strong><br>
URI scheme for DNS-SD registration type, e.g., &quot;ipp&quot;, &quot;http&quot;, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_SERVICE_URI</strong><br>
URI for service, e.g., &quot;ipp://printer.local./ipp/print&quot;, &quot;<a href="http://printer.local./&quot;">http://printer.local./&quot;</a>, etc.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IPPFIND_TXT_</strong><em>KEY</em><br>
Values of TXT record <em>KEY</em> (uppercase).
</p>
    <h2 id="ippfind-1.examples">Examples</h2>
<p>To show the status of all registered IPP printers on your network, run:
</p>
    <pre>
    ippfind --ls

</pre>
<p>Similarly, to send a PostScript test page to every PostScript printer, run:
</p>
    <pre>
    ippfind --txt-pdl application/postscript --exec ipptool
      -f onepage-letter.ps '{}' print-job.test \;
</pre>
    <h2 id="ippfind-1.see-also">See Also</h2>
<p><strong>ipptool</strong>(1)

</p>
    <h2 id="ippfind-1.copyright">Copyright</h2>
<p>Copyright &copy; 2020-2024 by OpenPrinting.
  </body>
</html>
